package com.sc.nft.service;



import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.AssetChangeLog;
import com.sc.nft.entity.IntegralDetailsVO;
import com.sc.nft.entity.UserInfo;
import com.sc.nft.entity.dto.BatchEnterIntegrationDTO;
import com.sc.nft.entity.vo.AdminUserExchangeRecordVO;
import com.sc.nft.entity.vo.BatchEnterIntegrationShowListVO;
import com.sc.nft.entity.vo.BatchEnterIntegrationShowVO;
import com.sc.nft.entity.vo.UserAssetsVO;
import com.sc.nft.enums.AssetChangeLogEnum;
import com.sc.nft.enums.CoinCategoryEnum;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 服务接口
 *
 * @author rdg
 * @since 2022-05-30 10:42:05
 * @description 由 Mybatisplus Code Generator 创建
 */
public interface UserAssetsService {
    //根据用户id币种枚举增加用户余额
    Boolean addIntegralByUserId(BigDecimal integralNum, Long userId, CoinCategoryEnum coinCategoryEnum, AssetChangeLogEnum assetChangeLogEnum,Long linkId,String linkName);
    //根据用户id币种枚举减少用户余额
    Boolean subIntegralByUserId(BigDecimal integralNum, Long userId, CoinCategoryEnum coinCategoryEnum, AssetChangeLogEnum assetChangeLogEnum,Long linkId,String linkName);
    //后台查看用户积分列表
    Page<UserAssetsVO> pageUserAssetsList(String userUuid, String nickName, String userTel, int pageNo, int pageSize);
    //后台查看用户积分变动记录
    Page<AssetChangeLog> pageAssetsChangeList(Long userId, Integer type, Date startDate, Date endDate, int pageNo, int pageSize);
    /**
    * @description:后台查看用户兑换记录
    * @author: rdg
    * @date: 2022/7/11 15:32
    * @param: [userId, typeClassify, startDate, endDate, pageNo, pageSize]
    * @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.sc.nft.entity.vo.AdminUserExchangeRecordVO>
    **/
    Page<AdminUserExchangeRecordVO> pageUserExchangeRecord(Long userId, Integer typeClassify, Date startDate, Date endDate, int pageNo, int pageSize);
    /**
    * @description: 积分变动详情
    * @author: rdg
    * @date: 2022/7/11 15:30
    * @param: []
    * @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.sc.nft.entity.IntegralDetailsVO>
    *
     * @param pageNo
     * @param pageSize*/
    Page<IntegralDetailsVO> integralDetails(Integer pageNo, Integer pageSize);

    /**
     * 查询积分
     * @param userInfo
     * @param type
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<IntegralDetailsVO> integralDetailsByType(UserInfo userInfo,Integer type,Integer pageNo, Integer pageSize);
    /**
     * 批量加减积分展示
     * @param file
     * @return
     */
    BatchEnterIntegrationShowVO batchEnterIntegrationShow(MultipartFile file);

    /**
     * 批量添加/减少积分
     * @param list
     * @param isAdd
     * @param reason
     */
    void batchAddEnterPoints(List<BatchEnterIntegrationShowListVO> list, Boolean isAdd, String reason);
}
